<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="../js/myPromise.js"></script>
    <script>
        let p = new myPromise((resolve, reject)=>{
            
            // reject('错误');
            setTimeout(() => {
                resolve('解决');
                console.log(111);
            }, 1000);
            
            
        }).then(
            value =>{
                console.log(value);
                return 100;
            },
            reason =>{
                console.log(reason);
            }
        ).then(
            value =>{
                console.log(value);
            },
            reason =>{
                console.log(reason);
            }
        );
        console.log(111);
        
    </script>
</body>
</html>